interface Person {
  name: string;
  age?: number;
  [propName: string]: any;
  say(): string;
}
interface Teacher extends Person {
  teacher(): string;
}
const getPersonName = (person: Person) => {
  console.log(person.name);
};

interface SayHi {
  (word: string): string;
}
const say = (word: string) => {
  return word;
};

const setPersonName = (person: Teacher, name: string) => {
  person.name = name;
};
const person = {
  name: "dell",
  sex: "mail",
  say() {
    return "";
  }
  // teacher(){
  //   return "";
  // }
};
getPersonName(person);
getPersonName(person);
// setPersonName(person, "lee");

class User implements Person {
  name: "dell";
  say() {
    return "hello";
  }
}
